% (c) 2011 Brice Boyer <bboyer@imag.fr>.
\documentclass[10pt]{article}
\usepackage[left=1.5cm,right=1.5cm,top=1cm,bottom=1cm]{geometry}
\usepackage[OT1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage[frenchb]{babel}
% \usepackage[francais]{babel}
\usepackage{amssymb}
\usepackage{amsmath}
% \usepackage{bookmark}
\usepackage{caption}
\usepackage{comment}
\usepackage{endfloat}
% \usepackage{fancyhdr}
\usepackage{float}
\usepackage{graphicx}
% \usepackage{hyperref}
\usepackage[urlcolor=cyan,pdftex%
,colorlinks,linkcolor=cyan%
% ,hyperindex%
% ,plainpages=false%
% ,bookmarksopen%
% ,bookmarksnumbered%
,bookmarks
% ,pagebackref
% ,naturalnames
% ,hyperindex=true
% ,frenchlinks=true
% ,linktocpage=true
]{hyperref}

%\usepackage{amsthm}
\usepackage{afterpage}
\usepackage{mathtools}%prescript
\usepackage{enumerate}
\usepackage{paralist}
% \usepackage{shortlst}
\usepackage{titlesec}
\usepackage{xspace}
\newcommand{\Fp}{{\mathbf F}}
\newcommand{\Pk}{\ensuremath{\mathfrak P}}
\newcommand{\rang}{\mathop{\textrm{Rg}}\nolimits}
\newcommand{\diag}{\mathop{\textrm{Diag}}\nolimits}
\newcommand{\vect}{\mathop{\textrm{Vect}}\nolimits}
\newcommand{\tr}{{\mathrm{trace}}}
\newcommand{\logc}{\log_{c}}
\newcommand{\ptito}{\mathrm{o}}
\newcommand{\grdO}{\mathrm{O}}
\newcommand{\Rb}{\mathbf{R}}
\newcommand{\Nb}{\mathbf{N}}
\newcommand{\Zb}{\mathbf{Z}}
\newcommand{\Cb}{\mathbf{C}}
\newcommand{\Cc}{\mathcal{C}}
\newcommand{\ic}{\mathrm{i}}
\newcommand{\ec}{\mathrm{e}}
\newcommand{\com}{\mathrm{Comm}}


\newcommand{\ds}{\displaystyle}
\newcommand{\bdm}{\begin{displaymath}}
\newcommand{\edm}{\end{displaymath}}
\newcommand{\diver}{\hbox{div}}
\newcommand{\sgn}{\hbox{sgn}}
\newcommand{\hun}{\hbox{H}^1(\Omega)}
\newcommand{\czero}{\hbox{C}^0(\bar{\Omega})}
\newcommand{\dpa}[2]{\frac{\partial #1}{\partial #2}}
% \newcommand{\vect}{{\mathrm{Vect}}}
\newcommand{\NN}{{\bf N}}
\newcommand{\CC}{{\bf C}}
\newcommand{\RR}{{\bf R}}
\newcommand{\ZZ}{{\bf Z}}
\newcommand{\dd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\im}{{\mathrm{Im}}}
\newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\aire}{{\mathcal{A}}}



\setcounter{secnumdepth}{4}
\renewcommand{\theparagraph}{\arabic{paragraph}}

\titleformat{\paragraph}[runin]
	{\normalfont\normalsize\bfseries}
	{Exercice \theparagraph.}
	{1em}
	{\normalfont\normalsize\itshape}

\titleformat{\section}
	{\flushright}
	{}
	{0em}
	{\normalfont\Large\textsc}

\def\transpo{\prescript{t}{\!}}
%\def\rp{racine primitive\xspace}
\frenchspacing
\pagestyle{empty}


\def\header#1{%
~\vspace*{-1 cm}\\%
L2 - UE MAT234\\%
\vspace{-3mm}
\hspace{1 pt}\hrule\hspace{1 pt}%
\begin{center}%
	{\bf Feuille d'exercices \no#1}\\%
\end{center}%
\vspace{-2mm}
\hspace{1 pt}\hrule\hspace{1 pt}%
\vspace{3 mm}%
}

% \newcounter{exo}

\newenvironment*{exo}[1][]%
{%
\begin{paragraph}{#1}%\label{exo:\value{paragraph}}%
	% \refstepcounter{exo}
	\hypertarget{exo:\arabic{paragraph}}{}%
	}%
	{
	\begin{flushright}
		% \hyperlink{cor:\arabic{paragraph}}{\rule{3cm}{0.1em}}
		\hyperlink{cor:\arabic{paragraph}}{$\blacksquare$}
	\end{flushright}%
\end{paragraph}%
}%

\newenvironment*{indication}%
{\begin{flushright}Indication.\xspace\normalfont\normalsize\itshape}%
{\end{flushright}}

\floatstyle{ruled}
\newfloat{solutionbox}{p}{lob}[paragraph]
\floatname{solutionbox}{Solution}


\newenvironment*{correction}%
{\begin{solutionbox}[P]
	\par\hypertarget{cor:\arabic{paragraph}}{}
	{Correction de l'%
	\hyperlink{exo:\arabic{paragraph}}{exercice \bf\arabic{paragraph}.}%
	}%
	\vspace{1 pt} \hspace{1 pt}\hrule\hspace{1 pt}%
	\par\ignorespaces}
	{\end{solutionbox}\par\ignorespacesafterend}

\newenvironment*{vraifaux}%
{%
\par\textbf{Vrai ou Faux ?}\begin{enumerate}[$\square$\quad$\square$\quad a)]
	\hypertarget{exo:\arabic{paragraph}}{}%
	\item[$V$\ \quad$F$\quad\phantom{a)}]%
	% \refstepcounter{exo}
	}%
	{\end{enumerate}
	\begin{flushright}
		% {$\blacksquare$}
		\hyperlink{cor:\arabic{paragraph}}{$\blacksquare$}
	\end{flushright}%
\par\ignorespacesafterend}%

